package com.xbongbong.paas.pojo.workflow.settings.dto;

import com.xbongbong.paas.toolbox.helper.PageHelper;
import com.xbongbong.paas.toolbox.wrap.BaseDTO;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;

/**
 * @author 吴峰
 * @date 2021/05/10 15:07
 */
@Setter
@Getter
@ToString
public class WorkflowVersionListDTO extends BaseDTO {
    private static final long serialVersionUID = 160273257151906025L;

    @NotNull(message = "{dto.msg.workflowId.NotNull}")
    private Long workflowId;

    @NotEmpty(message = "{dto.msg.WorkflowVersionListDTO.version.NotEmpty}")
    private String version;

    /**
     * 1 归档 2 未归档
     */

    @NotNull(message = "{dto.msg.WorkflowVersionListDTO.archive.NotNull}")
    private Integer archive;

    /**
     * 分页当前页
     */
    private Integer page;

    /**
     * 分页每页记录数
     */
    private Integer pageSize;

    public WorkflowVersionListDTO() {
        page = 1;
        pageSize = PageHelper.PAGE_SIZE;
        archive = 2;
    }
}
